package com.yanmaohu.nikita.data.function.statement;

import com.yanmaohu.nikita.data.expression.NameExpression;
import com.yanmaohu.nikita.data.function.FunctionBody;
import com.yanmaohu.nikita.data.function.ParameterList;

/**
 * @author Bright Lee
 */
public final class FunctionStatement extends Statement {

    private NameExpression functionName;
    private ParameterList parameterList;
    private FunctionBody functionBody;

    public FunctionStatement(NameExpression functionName,
                             ParameterList parameterList,
                             FunctionBody functionBody) {
        super(functionName.getBeginIndex(), functionBody.getEndIndex());
        this.functionName = functionName;
        this.parameterList = parameterList;
        this.functionBody = functionBody;
    }

    public NameExpression getFunctionName() {
        return functionName;
    }

    public ParameterList getParameterList() {
        return parameterList;
    }

    public FunctionBody getStatementList() {
        return functionBody;
    }

}
